home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / Peripherals / MacinTalk / Interfaces / Lisa / intrfc⁄speechintf.text next >
Text File  |  1989-04-13  |  2KB  |  82 lines

  1. UNIT SpeechIntf;
  2.  
  3.  
  4. INTERFACE
  5.  
  6.  
  7. USES
  8.         {$U-}
  9.         {$U obj/MemTypes  }  MemTypes,
  10.         {$U obj/QuickDraw }  QuickDraw,
  11.         {$U obj/OsIntf      }  OsIntf,
  12.         {$U obj/toolIntf  }  ToolIntf;
  13.  
  14.  
  15. CONST
  16.         noExcpsFile  = '';            {signals Reader to use only basic rules}
  17.         noReader = 'noReader';            {signals SpeechOn to NOT bring in Reader}
  18.         fullUnitT = -4000;            {error code for driver unit table full}
  19.  
  20.  
  21. TYPE
  22.         SpeechErr = Integer;
  23.         SpeechRecord  = array [0..99] of byte;  {Driver parm block, used internally}
  24.         SpeechPointer = ^SpeechRecord;            {pointer to driver parm block}
  25.         SpeechHandle  = ^SpeechPointer;            {handle to driver parm block}
  26.  
  27.         Sex     = (Male, Female);
  28.         F0Mode     = (Natural, Robotic, NoChange);
  29.         Language = (xEnglish, French, Spanish, German, Italian);
  30.  
  31.         VoiceRecord = RECORD
  32.                         theSex:          Sex;
  33.                         theLanguage:  Language;
  34.                         theRate:      INTEGER;
  35.                         thePitch:     INTEGER;
  36.                         theMode:      F0Mode;
  37.                         theName:      Str255;
  38.                         refCon:          LongInt;
  39.                       END;
  40.         VoicePtr = ^VoiceRecord;
  41.  
  42.  
  43. FUNCTION  SpeechOn      (ExcpsFile: Str255;
  44.                          VAR theSpeech: SpeechHandle): SpeechErr;
  45.  
  46. PROCEDURE SpeechOff     (theSpeech: SpeechHandle);
  47.  
  48. PROCEDURE SpeechRate    (theSpeech: SpeechHandle;
  49.                          theRate: Integer);
  50.  
  51. PROCEDURE SpeechPitch   (theSpeech: SpeechHandle;
  52.                          thePitch: Integer;
  53.                          theMode: F0Mode);
  54.  
  55. PROCEDURE SpeechSex     (theSpeech: SpeechHandle;
  56.                          theSex: Sex);          {reserved for future implementation}
  57.  
  58. FUNCTION Reader            (theSpeech: SpeechHandle;
  59.                          EnglishInput: Ptr;
  60.                          InputLength: LongInt;
  61.                          PhoneticOutput: Handle): SpeechErr;
  62.  
  63. FUNCTION MacinTalk      (theSpeech: SpeechHandle;
  64.                          Phonemes: Handle): SpeechErr;
  65.  
  66.  
  67.  
  68. IMPLEMENTATION
  69.  
  70.  
  71. FUNCTION SpeechOn;      EXTERNAL;
  72. FUNCTION Reader;        EXTERNAL;
  73. FUNCTION MacinTalk;     EXTERNAL;
  74.  
  75. PROCEDURE SpeechOff;    EXTERNAL;
  76. PROCEDURE SpeechRate;   EXTERNAL;
  77. PROCEDURE SpeechPitch;  EXTERNAL;
  78. PROCEDURE SpeechSex;    EXTERNAL;        {reserved for future implementation}
  79.  
  80.  
  81. END. { of unit }
  82.